import pytest

from common.yaml_tools import YamlTools
from yige.requests_test import CommonApi

registerdata = YamlTools.read_yaml_file("api_login.yaml")[0]
print(registerdata)

class TestRegister:
    @pytest.mark.parametrize("register_data", registerdata["parametrize"])
    def test_register(self,register_data):
        result=CommonApi.demo4(register_data["data"]["userName"],register_data["data"]["password"],register_data["data"]["gender"],register_data["data"]["phoneNum"],register_data["data"]["email"],register_data["data"]["address"])
        assert result == register_data["expect"],"注册失败"





